package zhongbo.java.air.dictionary.model;

import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import zhongbo.java.air.dictionary.model.enumType.ZoneType;

import javax.validation.constraints.*;
import java.util.Date;
import java.io.Serializable;
import java.util.Set;

/**
 * 警戒区域配置表(AirAlertZone)实体类
 *
 * @author 朱星谊
 * @since 2025-03-31 14:06:59
 */
@Data
@TableName("air_alert_zone")
@ApiModel("警戒区域")
public class AirAlertZone implements Serializable {

    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;

    @NotBlank(message = "区域业务编号不能为空")
    @Size(min = 3, max = 20, message = "区域业务编号长度需在3到20位之间")
    @ApiModelProperty(value = "区域业务编号",example = "001")
    private String zoneCode;

    @NotNull(message = "区域类型不能为空")
    @Pattern(regexp = "^(NO_FLY|RESTRICTED|TEMPORARY)$", message = "区域类型只能为NO_FLY,RESTRICTED,TEMPORARY")
    @ApiModelProperty(value = "区域类型",example = "NO_FLY")
    private String zoneType;

    @NotBlank(message = "多边形顶点坐标不能为空")
    @Size(min = 3, max = 300, message = "多边形顶点坐标长度需在3到300位之间")
    @ApiModelProperty(value = "多边形顶点坐标",example = "00110")
    private String vertices;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "生效开始时间",example = "2025-3-31 16:33:33")
    private Date effectiveStart;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "生效结束时间",example = "2025-3-31 16:33:33")
    private Date effectiveEnd;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间",example = "2025-3-31 16:33:33")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间",example = "2025-3-31 16:33:33")
    private Date updateTime;

}

